using RestaurantFinder.Core.Models;

namespace RestaurantFinder.Core.Services;

/// <summary>
/// 页面状态管理服务接口 - 支持跨页面状态驻留
/// </summary>
public interface IPageStateService
{
    /// <summary>
    /// 保存餐厅发现页面状态
    /// </summary>
    /// <param name="state">页面状态数据</param>
    Task SaveRestaurantDiscoveryStateAsync(RestaurantDiscoveryState state);

    /// <summary>
    /// 获取餐厅发现页面状态
    /// </summary>
    /// <returns>页面状态数据，如果不存在则返回null</returns>
    Task<RestaurantDiscoveryState?> GetRestaurantDiscoveryStateAsync();

    /// <summary>
    /// 清除餐厅发现页面状态
    /// </summary>
    Task ClearRestaurantDiscoveryStateAsync();

    /// <summary>
    /// 检查是否存在保存的状态
    /// </summary>
    Task<bool> HasSavedStateAsync(string stateKey);
} 